

package com.hazelcast.multimap.impl.txn;

import com.hazelcast.internal.serialization.Data;
import com.hazelcast.multimap.impl.MultiMapDataSerializerHook;
import com.hazelcast.multimap.impl.operations.AbstractKeyBasedMultiMapOperation;

public class TxnGenerateRecordIdOperation extends AbstractKeyBasedMultiMapOperation {

    public TxnGenerateRecordIdOperation() {
    }

    public TxnGenerateRecordIdOperation(String name, Data dataKey) {
        super(name, dataKey);
    }

    @Override
    public void run() throws Exception {
        response = getOrCreateContainer().nextId();
    }

    @Override
    public int getClassId() {
        return MultiMapDataSerializerHook.TXN_GENERATE_RECORD_ID;
    }
}
